// let scale = 1.0 / window.devicePixelRatio;
// let text = `<meta name="viewport" content="width=device-width, initial-scale=${scale}, maximum-scale=${scale}, minimum-scale=${scale}, user-scalable=no">`;
// document.write(text);
// document.documentElement.style.fontSize = window.innerWidth / 7.5 + "px";
window.onload = function () {
    //获取屏幕宽度
    var w = document.body.clientWidth;
    // 这里*100 是为了取整数
    var x = parseInt((w * 100) / 375 * 10) / 10;
    //获取任意屏幕上的根节点字体大小
    document.getElementsByTagName('html')[0].style.fontSize = x + 'px';
    //监听屏幕宽度变化
    window.onresize = function () {
        //获取屏幕宽度
        var w = document.body.clientWidth;
        //获取任意屏幕上的根节点字体大小
        var x = parseInt((w * 100) / 375 * 10) / 10;;
        document.getElementsByTagName('html')[0].style.fontSize = x + 'px';
    }
}